<template>
  <div class="appoint-view">
    <el-tabs v-model="activeTab" type="card">
      <el-tab-pane label="预约管理" name="manage">
        <YuyueList />
      </el-tab-pane>
      <el-tab-pane label="新增预约" name="add">
        <YuyueForm @success="handleSuccess" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import YuyueList from '@/components/YuyueList.vue'
import YuyueForm from '@/components/YuyueForm.vue'

const activeTab = ref('manage')

const handleSuccess = () => {
  activeTab.value = 'manage'
}
</script>

<style scoped>
.appoint-view {
  padding: 20px;
}
</style>
